package com.zzxz.practicaltrainingsys.service;

import com.github.pagehelper.PageInfo;
import com.zzxz.practicaltrainingsys.entity.Homeworkfinish;

import java.util.List;
import java.util.Map;

public interface HomeworkfinishService {
    List<Homeworkfinish> queryAllHomeworkfinish();
    List<Homeworkfinish> getProHomeworkfinishById(Integer id);
    List<Homeworkfinish> getHomeHomeworkfinishById(Integer id);
    Homeworkfinish getDetailHomeworkfinishById(Integer id);

    List<Map<String, Object>> getAllHomeworkfinish();
    PageInfo<Map<String, Object>> findHomeworkfinishPages(Integer pageNum, Integer  pageSize);
    // 根据学生ID获取已提交作业列表
    List<Homeworkfinish> getHomeworksByStudentId(Integer studentId);

    // 获取学生某个作业的提交详情
    Homeworkfinish getStudentHomeworkDetail(Integer studentId, Integer homeworkId);

    // 学生提交作业
    int insertHomeworkfinish(Homeworkfinish homeworkfinish);

    // 学生更新作业
    int updateHomeworkfinish(Homeworkfinish homeworkfinish);

    // 获取小组作业完成详细
    List<Homeworkfinish> getTeamHomeworkDetails(Integer teamId, Integer homeworkId);
    //判断组长
    boolean isTeamLeader(Integer studentId, Integer teamId);

    // 获取学生团队信息
    Map<String, Object> getStudentTeamInfo(Integer studentId, Integer projectId);

    int gradeIndividualHomework(Integer homeworkId, Integer studentId, String homeworkMarks, String teacherComment);

    //批改小组作
    int gradeTeamHomework(Integer homeworkId, Integer teamId, String homeworkMarks, String teacherComment);

    //打回个人作业
    int returnIndividualHomework(Integer homeworkId, Integer studentId, Integer homeworkBack);

    //打回小组作业
    int returnTeamHomework(Integer homeworkId, Integer teamId, Integer homeworkBack);

}
